package com.bit.springmvc.demo.service;

import com.bit.springmvc.demo.mapper.MessageInfoMapper;
import com.bit.springmvc.demo.model.MessageInfo;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService {

    @Resource(name = "messageInfoMapper")
    private MessageInfoMapper messageInfoMapper;

    public List<MessageInfo> getList() {
        return messageInfoMapper.selectAll();
    }

    public Integer insertMessage(MessageInfo messageInfo) {
        return messageInfoMapper.insertMessage(messageInfo);
    }
}
